* searching.texi (Match Data): Note that match data can be
authorTobias C. Rittweiler <tcr@freebits.de>
Sun, 3 Jul 2011 18:44:53 +0000 (20:44 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 3 Jul 2011 18:44:53 +0000 (20:44 +0200)
overwritten by most functions.

doc/lispref/ChangeLog
doc/lispref/searching.texi

index 91bd461d4da88d78b56faa6daef7f44a8dcefb03..425ee3447066c8f8425a31a6730120494f35223a 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-03  Tobias C. Rittweiler  <tcr@freebits.de>  (tiny change)
+
+       * searching.texi (Match Data): Note that match data can be
+       overwritten by most functions (bug#2499).
+
 2011-07-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * strings.texi (Formatting Strings): Clarify what the "-" and "0"
index 27b089f75b63aab14927c9d48f7c357986824782..6272301dbb475c1228c01ae415a1d2323d6a2c65 100644 (file)
@@ -1207,6 +1207,12 @@ search you wish to refer back to and the use of the match data.  If you
 can't avoid another intervening search, you must save and restore the
 match data around it, to prevent it from being overwritten.
 
+  Notice that all functions are allowed to overwrite the match data
+unless they're explicitly documented not to do so.  A consequence is
+that functions that are run implictly in the background
+(@pxref{Timers}, and @ref{Idle Timers}) should likely save and restore
+the match data explicitly.
+
 @menu
 * Replacing Match::       Replacing a substring that was matched.
 * Simple Match Data::     Accessing single items of match data,